package com.sunda.spmsuser.service.impl;

import com.sunda.spmsuser.entity.SpmsUserWorkshop;
import com.sunda.spmsuser.mapper.SpmsUserWorkshopMapper;
import com.sunda.spmsuser.service.ISpmsUserWorkshopService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 用户车间关联关系表 服务实现类
 * </p>
 *
 * @author Wayne
 * @since 2021-01-25
 */
@Service
public class SpmsUserWorkshopServiceImpl extends ServiceImpl<SpmsUserWorkshopMapper, SpmsUserWorkshop> implements ISpmsUserWorkshopService {

    @Autowired
    SpmsUserWorkshopMapper spmsUserWorkshopMapper;

    @Override
    public List<Map<String, Object>> getUserWorkshopList(String userId) {
        try {
            return spmsUserWorkshopMapper.getUserWorkshopList(userId);
        }catch (Exception e){
            e.printStackTrace();
            return null;
        }
    }
}
